package StringExercise;

public class stringBuilder {
    public static void main(String[] args) {
        String str = "123457";
        StringBuilder builder = new StringBuilder(str);
        System.out.println(builder.append("a"));

        System.out.println(builder.delete(1, 2));

        System.out.println(builder.replace(1, 2, "45"));

        System.out.println(builder.insert(3, "67"));

        String str1 = "MiHoYou";
        StringBuilder builder1 = new StringBuilder(str1);
        System.out.println(builder1.append("~"));

        System.out.println(builder1.delete(0, 2));

        System.out.println(builder1.replace(1, 2, "Ji"));

        System.out.println(builder1.insert(3, "N"));

    }
}
